home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 003 / db3.arc / DEPTRANS.PRG < prev    next >
Encoding:
Text File  |  1984-10-25  |  2.0 KB  |  62 lines

  1.            ********** Deptrans COMMAND FILE **********
  2. * Applies deposits from the Getdep file against the matching invoices in the
  3. * Invoices file as payments are received against them.
  4. ****************************************************************************
  5. *
  6. GO TOP
  7. CLEAR
  8. DO WHILE .NOT. EOF()
  9.    
  10.    Number = STR(RECNO(),5)
  11.    @  6,20 SAY 'RECORD NUMBER  '+Number
  12.    @  7, 0 CLEAR
  13.    *
  14.    IF Inv_Nmbr=' ' .OR. DELETED()
  15.       SKIP
  16.    ELSE
  17.       @  7,20 SAY 'INVOICE NUMBER '+Inv_Nmbr
  18.       Key = Inv_Nmbr
  19.       Decision = SPACE(0)
  20.       *
  21.       SELECT 10
  22.       FIND &Key
  23.       Again = .T.
  24.       IF RECNO() = 0
  25.          DO WHILE Again
  26.             @  9,15 SAY 'THIS INVOICE NUMBER IS NOT IN THE INVOICE FILE. '
  27.             @ 11,15 SAY '     Any key to EDIT '
  28.             @ 12,15 SAY '     Press <ENTER> to continue.'
  29.             WAIT ' ' TO Decision
  30.             *
  31.             IF LEN(Decision) <> 0
  32.                CLEAR
  33.                SELECT 1
  34.                @  6,0 SAY '          Entry '+STR(RECNO(),5)
  35.                @  8,0 SAY '      HOW MUCH' GET Deposit
  36.                @  9,0 SAY 'OUR INVOICE NO' GET Inv_Nmbr
  37.                @ 10,0 SAY '    CHECK FROM' GET Payer PICTURE ;
  38.                  '!!!!!!!!!!!!!!!!!!!!'
  39.                @ 11,0 SAY 'THEIR CHECK NO' GET Pay_Nmbr PICTURE '!!!!!!!'
  40.                @ 12,0 SAY '      Comments' GET Comments PICTURE ;
  41.                  '!!!!!!!!!!!!!!!!!!!!'
  42.                READ
  43.                SELECT 10
  44.                Again = .F.
  45.             ELSE
  46.                Again = .F.
  47.             ENDIF 
  48.          ENDDO Again
  49.       ELSE
  50.          REPLACE Amt_Rcd WITH (Amt_Rcd + A->Deposit), Date_Rcd WITH A->Dep_Date
  51.       ENDIF 0
  52.       SELECT 1
  53.       *
  54.       * We do not skip to the next record if the record was edited.  This
  55.       * allows us to run the edited record through the process again.
  56.       IF LEN(Decision) = 0
  57.          SKIP
  58.       ENDIF
  59.    ENDIF no invoice number or record deleted
  60. ENDDO the transfer
  61. RETURN
  62.